//
//  YSMeCzViewController.m
//  YouSheng
//
//  Created by Mac on 16/8/26.
//  Copyright © 2016年 FanShuHan. All rights reserved.
//

#import "YSMeCzViewController.h"
#import "YSMeYaoCzViewController.h"
#import <Masonry.h>

#define YSBJColorLan [UIColor colorWithRed:78/255.0 green:204/255.0 blue:190/255.0 alpha:1]
#define YSBJColorHui [UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1]

@interface YSMeCzViewController ()

@end

@implementation YSMeCzViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = YSBJColorHui;
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    self.title = self.titleName;
    
    [self setupTwoBtn];
    
}

- (void)setupTwoBtn {
    UIButton *czkBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    czkBtn.layer.cornerRadius = 5;
    
//    czkBtn.titleLabel.text = @"充值卡充值";
    czkBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
    czkBtn.backgroundColor = YSBJColorLan;
    [czkBtn setTitle:@"充值卡充值" forState:UIControlStateNormal];
    [czkBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted];
    [czkBtn addTarget:self action:@selector(czkBtnClick) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:czkBtn];
    
    [czkBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(20);
        make.right.equalTo(self.view).offset(-20);
        make.top.equalTo(self.view).offset(100);
        make.height.mas_equalTo(44);
    }];
    
    UIButton *zxBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    zxBtn.layer.cornerRadius = 5;
    
    //    czkBtn.titleLabel.text = @"充值卡充值";
    zxBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
    zxBtn.backgroundColor = YSBJColorLan;
    [zxBtn setTitle:@"在线充值" forState:UIControlStateNormal];
    [zxBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted];
    [zxBtn addTarget:self action:@selector(zxBtnClick) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:zxBtn];
    
    [zxBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(20);
        make.right.equalTo(self.view).offset(-20);
        make.top.equalTo(czkBtn.mas_bottom).offset(10);
        make.height.mas_equalTo(44);
    }];

}

#pragma mark - 按钮点击

- (void)czkBtnClick {
    YSMeYaoCzViewController *yczVC = [[YSMeYaoCzViewController alloc] init];
    yczVC.navTitle = self.titleName;
    [self.navigationController pushViewController:yczVC animated:YES];
}

- (void)zxBtnClick {
    
}

@end
